package com.mce.nebula.entity;

import com.mce.nebula.common.BaseEntity;
import jakarta.persistence.*;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 应用组实体
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Entity
@Table(name = "service_group", 
       uniqueConstraints = @UniqueConstraint(columnNames = {"tenant_id", "group_name"}))
public class AppGroup extends BaseEntity {
    
    @Column(name = "group_id", length = 32, unique = true, nullable = false)
    private String groupId;
    
    @Column(name = "tenant_id", length = 32, nullable = false)
    private String tenantId;
    
    @Column(name = "group_name", length = 100, nullable = false)
    private String groupName;
    
    @Column(name = "group_alias", length = 100)
    private String groupAlias;
    
    @Column(name = "group_key", length = 32)
    private String groupKey;
    
    @Column(name = "region_name", length = 64, nullable = false)
    private String regionName;
    
    @Column(name = "description", length = 200)
    private String description;
    
    @Column(name = "creater", nullable = false)
    private Integer creater = 0;
    
    @Column(name = "is_public", nullable = false)
    private Boolean isPublic = false;
    
    @Column(name = "is_governance", nullable = false)
    private Boolean isGovernance = false;
    
    @Column(name = "governance_mode", length = 32)
    private String governanceMode;
    
    @Column(name = "enterprise_id", length = 32)
    private String enterpriseId;
    
    @Override
    public String toString() {
        return this.groupName;
    }
}





